package com.example.coco.Controller;


import com.example.coco.model.Admin;
import com.example.coco.res.AdminMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
public class Selectadmin {
    @Autowired
    AdminMapper adminMapper;

    @RequestMapping("/show")
    public String userMapper(Model m){
        List<Admin> admins = adminMapper.findAll();
        m.addAttribute("Admin",admins);
        return "show";
    }
}
